package com.example.camunda.dto;

import lombok.Data;
import org.camunda.bpm.engine.runtime.ProcessInstance;
import org.springframework.beans.BeanUtils;
@Data
public class TaskResultDto {

    private String id;
    private String definitionId;
    private String businessKey;
    private String caseInstanceId;
    private boolean ended;
    private boolean suspended;
    private String tenantId;

    public static ProcessInstanceDto from(ProcessInstance instance) {
        ProcessInstanceDto dto = new ProcessInstanceDto();
        BeanUtils.copyProperties(instance, dto);
        return dto;
    }
}
